<!DOCTYPE html>
<html lang="en">
<head>
  <title>浩然金融中心管理平台</title>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"
        name="viewport">
  <#include "/common/csslib.html">
</head>
<body>
<div class="main-wrapper">
  <!-- start: MAIN CONTAINER -->
  <div class="main-container inner">
    <!-- start: PAGE -->
    <div class="main-content">
      <div class="container">
        <div class="row h-home-path">
          <div class="col-md-12">
            <ol class="breadcrumb">
              <li><i class="fa fa-home"></i>&nbsp;&nbsp;所在位置</li>
              <li>首页</li>
              <li class="active">编辑接口方法参数对象信息</li>
            </ol>
          </div>
        </div>
        <div class="row">
          <ul class="nav nav-tabs" id="myTab">
            <li class="active" id="tab-apiFacadeObj"><a data-toggle="tab" href="#tab-apiFacadeObjDiv">
              接口方法参数对象信息</a></li>
            <li id="tab-apiFacadeObjParam"><a data-toggle="tab" href="#tab-apiFacadeObjParamDiv">接口方法对象参数信息</a></li>
          </ul>
          <div class="tab-content" id="myTabContent">
            <div class="tab-pane fade in active" id="tab-apiFacadeObjDiv">
              <#include "api/apiFacadeObj_form.html">
            </div>
            <div class="tab-pane fade" id="tab-apiFacadeObjParamDiv">
              <#include "api/apiFacadeObjParam_index.html">
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- end: PAGE -->
  </div>
  <!-- end: MAIN CONTAINER -->
</div>

<#include "/common/jslib.html">
<!-- 弹窗下拉 -->
<script type="text/javascript">
    function returnIndex() {
        window.location.href = "/apiFacadeObj/query";
    }

    $(function () {
        // 页面操作类型：add(添加)-edit(编辑)-view(查看)
        var operation = $("#operation").val();
        // 弹出窗体控制
        ApiFacadeObjMgr = {
            // 初始化
            init: function () {
                // 查看的时候不显示保存按钮
                if (operation == "view") {
                    Jmts.setFormReadOnly();
                }
                initAmtAndRate();
            },
            // init end

            // 提交数据
            submitForm: function () {
                Jmts.ajaxSubmit(document.getElementById("apiFacadeObjForm"), function (result) {
                    if (result.success) {
                        if (operation == 'add') {
                            ApiFacadeObjMgr.returnIndex();
                        } else {
                            Jmts.succTips(result.msg);
                            window.location.reload();
                        }
                    } else {
                        Jmts.warnTips(result.msg);
                    }
                });
                return false;
            },
            // submitForm end
            returnIndex: function () {
                window.location.href = "/apiFacadeObj/query";
            }
        };
        // 执行初始化
        ApiFacadeObjMgr.init();
        // 前台验证表单
        $("#apiFacadeObjForm").validate();
    });
</script>
</body>
</html>
